package com.lei2j.decorator;

/**
 * Created by lei2j on 2019/1/13.
 */
public class Test {

    public static void main(String[] args) {
        Beverage1 beverage1 = new DarkRoast1(1);
        System.out.println(beverage1.getDescription()+beverage1.cost());
        Mocha mocha = new Mocha(beverage1);
        System.out.println(mocha.getDescription()+mocha.cost());
        Whip whip = new Whip(mocha);
        System.out.println(whip.getDescription()+" "+whip.cost());
        Beverage1 beverage2 = new DarkRoast1(2);
        System.out.println(beverage2.getDescription()+beverage2.cost());
        Mocha mocha1 = new Mocha(beverage2);
        System.out.println(mocha1.getDescription()+mocha1.cost());
        Whip whip1 = new Whip(mocha1);
        System.out.println(whip1.getDescription()+" "+whip1.cost());
    }
}
